<include file="Public/head" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/jquery-treetable/css/jquery.treetable.css" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/jquery-treetable/css/jquery.treetable.theme.default.css" />
<script src="{:get_style_cdnurl()}paimai/yunying/plugin/jquery-treetable/jquery.treetable.js" type="text/javascript"></script>
</head>
<body>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar" menu='xtgl.cdgl' />
    <div class="mianR">
        <div class="listBox">
            <div class="yuList">
                <div class="yuSuo">
                    <input id="list_order" type="button" value="排序" class="suoSou" />
                </div>
                <br/>
                <table class="table table-bordered" id="menus-table">
                    <thead>
                    <tr>
                        <th width="80">排序</th>
                        <th width="50">ID</th>
                        <th>菜单名称</th>
                        <th>应用</th>
                        <th>类型</th>
                        <th width="80">状态</th>
                        <th width="180">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <form id="orderForm">
                            {$categorys}
                        </form>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<script >
    $(document).ready(function() {
        $("#menus-table").treetable({
            expandable: true
        });
        
        $("#list_order").click(function () {
            $.post('/Menu/list_orders',$("#orderForm").serialize(),function (data) {
                if(data.code!=200){
                    delay_alert("更新失败",500)
                    return
                }
                delay_alert("更新成功",500,function () {
                    window.location.reload()
                })
            },'json');
        });
    });

</script>
<include file="Public/foot" />